]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switcherPopup: Cancel the OSD popup before showing
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 2 Mar 2013 18:56:37 +0000 (19:56 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 3 Mar 2013 11:59:09 +0000 (12:59 +0100)
It is irritating to show two different system popups at the same
time, so let switcher popups like alt-tab cancel out the OSD.

https://bugzilla.gnome.org/show_bug.cgi?id=613543

js/ui/osdWindow.js
js/ui/switcherPopup.js

index fc90ed2885eda3a500a08a281285f16efc8d127b..efcd10dc94fa6de6f4e0e2e726077c76131346f3 100644 (file)
@@ -140,6 +140,15 @@ const OsdWindow = new Lang.Class({
                                                    Lang.bind(this, this._hide));
     },
 
+    cancel: function() {
+        if (!this._hideTimeoutId)
+            return;
+
+        Mainloop.source_remove(this._hideTimeoutId);
+        this._hideTimeoutId = 0;
+        this._hide();
+    },
+
     _hide: function() {
         Tweener.addTween(this.actor,
                          { opacity: 0,
index bfe172b0c863f34e925e01ba29f14f47f3cc356f..b31dc2edb6c2e5dba5cb71fa0fe61f0b0948ebae 100644 (file)
@@ -160,6 +160,7 @@ const SwitcherPopup = new Lang.Class({
         // disturbed by the popup briefly flashing.
         this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT,
                                                            Lang.bind(this, function () {
+                                                               Main.osdWindow.cancel();
                                                                this.actor.opacity = 255;
                                                                this._initialDelayTimeoutId = 0;
                                                            }));